import requests
import re
import json


def requests_url(url):
    page = requests.get(url=url)
    page.encoding = page.apparent_encoding
    return page.text.replace("\r\n", "")


if __name__ == '__main__':
    page = requests_url('https://www.cnblogs.com/howhy/p/5970597.html')

    print(re.findall('(</tr>[\s\S]*?</tbody>)', page))
    print(re.findall('<div.class="title">[\s\S]*?<h1>(.*?)</h1>', page))
    s = re.findall('<td>([\s\S]*?)</td>', page)[0].replace("<br>", "\n")
    print(re.sub('<p>|</p>', '', s))
    print(re.findall('<div.class="itnews c_ad_block">([\s\S]*?)</div>', page))
